<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生成绩管理系统</title>
    <link rel="stylesheet" href="/component/layui/css/layui.css">
    <link rel="stylesheet" href="/css/demo.css">
</head>
<body>
<div class="container">
    <div class="layui-row">
        <div class="layui-col-xs12">
            <h1 style="text-align: center">学生成绩管理系统</h1>
        </div>
    </div>
    <div class="layui-row">

        <div class="layui-col-xs12 toolbar">
            <div class="layui-row">
                <button type="button" class="layui-btn layui-btn-sm layui-btn-normal"
                        onclick="showScoreDlg();return false;">

                    <i class="layui-icon layui-icon-addition"></i>
                </button>

                <button type="button" class="layui-btn layui-btn-sm layui-btn-normal layui-bg-red"
                        onclick="deleteConfirm();" style="float:right;">
                    <i class="layui-icon layui-icon-delete"></i>
                </button>
            </div>

            <div class="queryBox">
                <form action="" class="layui-form" id="queryForm">
                    <ul class="query-inline">

                        <li class="layui-input-group">
                            <div class="layui-input-prefix">
                                学号
                            </div>
                            <input type="text" placeholder="学号" class="layui-input" name="sno">
                        </li>

                        <li class="layui-input-group">
                            <div class="layui-input-prefix">
                                课程名
                            </div>
                            <input type="text" placeholder="课程名" class="layui-input" name="cname">
                        </li>

                        <li class="layui-input-group">
                            <div class="layui-input-prefix">
                                成绩
                            </div>
                            <input type="number" placeholder="成绩" class="layui-input" name="score">
                        </li>
                        <li class="layui-input-group">
                            <button type="button" class="layui-btn layui-btn-normal"
                                    onclick="search();return false;" style="margin-left: 20px;">查询
                            </button>
                        </li>
                    </ul>

                </form>
            </div>
        </div>


    </div>

    <div class="layui-row">
        <div class="layui-col-xs12">
            <table class="layui-hide" id="tbScore" lay-filter="tbScore"></table>

            <!--        <table class="layui-table" lay-even>-->
            <!--            <thead>-->
            <!--            <tr>-->
            <!--                <th>id</th>-->
            <!--                <th>姓名</th>-->
            <!--                <th>性别</th>-->
            <!--                <th>年龄</th>-->
            <!--                <th>工号</th>-->
            <!--                <th>编辑</th>-->
            <!--            </tr>-->
            <!--            </thead>-->
            <!--            &lt;!&ndash;                <tr th:each="student :${students}">&ndash;&gt;-->
            <!--            &lt;!&ndash;                    <td th:text="${student.id}"></td>&ndash;&gt;-->
            <!--            &lt;!&ndash;                    <td th:text="${student.name}"></td>&ndash;&gt;-->
            <!--            &lt;!&ndash;                    <td th:text="${student.sex == 1 ? '女' : (student.sex == 2 ? '男' : '未知')}"></td>&ndash;&gt;-->
            <!--            &lt;!&ndash;                    <td th:text="${student.age}"></td>&ndash;&gt;-->
            <!--            &lt;!&ndash;                    <td th:text="${student.sno}"></td>&ndash;&gt;-->
            <!--            &lt;!&ndash;                </tr>&ndash;&gt;-->
            <!--            <tbody id="teacherTb">-->

            <!--            </tbody>-->



            <!--        </table>-->

        </div>
    </div>

</div>
<script type="text/html" id="editTemplate">
    <div class="layui-clear-space">
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    </div>
</script>
<div id ="popDlg" style="display: none;">
    <form class="layui-form dlgcontainer" id="scoreForm" >
        <div class="demo-reg-container">
            <div class="layui-form-item">
                <div class="layui-row">
                    <div class="layui-col-xs12">
                        <div class="layui-input-wrap">
                            <div class="layui-input-prefix">
                                <i class="layui-icon layui-icon-cellphone"></i>
                            </div>
                            <input type="text" name="id" placeholder="id" lay-reqtext="id" autocomplete="off" class="layui-input" id="id">
                        </div>
                    </div>

                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-wrap">
                    <div class="layui-input-prefix">
                        <i class="layui-icon layui-icon-vercode"></i>
                    </div>
                    <input type="text" name="sno" value="" lay-verify="required" placeholder="学号" lay-reqtext="请填写学号" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-wrap">
                    <div class="layui-input-prefix">
                        <i class="layui-icon layui-icon-password"></i>
                    </div>
                    <input type="text" name="cname" value="" lay-verify="required" placeholder="课程名" autocomplete="off" class="layui-input" id="cname">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-wrap">
                    <div class="layui-input-prefix">
                        <i class="layui-icon layui-icon-vercode"></i>
                    </div>
                        <input type="number" name="score" value="" lay-verify="required" placeholder="成绩" autocomplete="off" class="layui-input" id="score">
                    </div>
                </div>
            <div class="layui-form-item">
                <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="score-dlg" id="btnOK">确定</button>
            </div>

        </div>
    </form>
</div>

<script src="/component/layui/layui.js"></script>
<script src="/pagejs/score.js"></script>
</body>
</html>